<?php echo $this->tinyMce; ?>
<?php echo form_open_multipart('emaillist/edittemplate',array('name'=>'form-sendemail','class'=>'form-validate'));?>
<fieldset>
<legend><h4><?php echo $title; ?></h4></legend>
<div class="control-group">
    <label class="control-label">Subject</label>
    <div class="controls">
      <input type="text" value="<?php echo $template['subject']; ?>" name="subject" style="width:400px" placeholder="subject..." class="form-control" required />
    </div>
</div><br />
<div class="control-group">
    <label class="control-label">Body</label>
    <div class="controls">
      <textarea id="emailbody" name="emailbody" rows="15" cols="80"><?php echo $template['body']; ?></textarea>
    </div>
</div>
<div class="control-group">
    <div class="controls">
        
      <label class="checkbox">
        <?php
        if($template['activate'] == 1)
        {
            echo '<input name="activate" type="checkbox" checked="checked" /> Active';    
        }
        else
        {
            echo '<input name="activate" type="checkbox" /> Active';
        }
         ?>
      </label>
      <?php echo form_hidden('template_id', $template['template_id']); ?>
      <?php echo $form; ?>
    </div>
  </div>
</fieldset> 
<?php echo form_close();?>